﻿namespace HuwmanCode.ServiceProcess

open System
open System.Diagnostics
open System.ServiceProcess

///<summary>
/// Specfies the WindowsService service account details
///</summary>
[<AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)>]
type public ServiceAccountAttribute(serviceAccount : ServiceAccount, userName : string) =
    inherit Attribute()
    new (serviceAccount : ServiceAccount) = ServiceAccountAttribute(serviceAccount, null)
    
    member internal x.Account
        with get() = serviceAccount

     member internal x.UserName
        with get() = userName
